<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>数据填报及时性</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/Top.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/style.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/easyui/themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/easyui/themes/icon.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/buttons.css" />
    <script type="text/javascript" src="${pageContext.request.contextPath}/easyui/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/easyui/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/util/jquery.cookie.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/YMLib.js"></script>
    <script type="text/javascript" src="./js/common.js"></script>
    <script type="text/javascript">
        $(function () {
            loadUnit1("gydw",$.cookie("unit"));
            loadBmbmXmlx("xmlx", "tbjsx");
            loadDate('startTime');
            loadDate('endTime');
            queryXmlist();
        });

        var gydwstr;

        function exportXm() {
            var gydwdm = $("#gydw").combotree("getValues");
            if (gydwdm.length == 0) {
                gydwstr = $.cookie("unit2");
            } else if (gydwdm.length == 1) {
                if (gydwdm[0].substr(gydwdm[0].length-2,gydwdm[0].length)=="00") {
                    gydwdm[0] = gydwdm[0].substr(0,gydwdm[0].length-2);
                }
                if (gydwdm[0].substr(gydwdm[0].length-2,gydwdm[0].length)=="00") {
                    gydwdm[0] = gydwdm[0].substr(0,gydwdm[0].length-2);
                }
                gydwstr = gydwdm[0] ;
            } else {
                gydwstr = gydwdm.join(',');
            }
            var params = "gydwdm="+gydwstr+"&startTime="+$("#startTime").datebox("getValue")+"&endTime="+$("#endTime").datebox("getValue")+"&jsxz="+getValuesById("xmlx");
            window.location.href="/jxcsxm/operate/exportDatatjsx.do?"+params;
        }

        function queryXmlist() {
            var gydwdm = $("#gydw").combotree("getValues");
            if (gydwdm.length == 0) {
                gydwstr = $.cookie("unit2");
            } else if (gydwdm.length == 1) {
                if (gydwdm[0].substr(gydwdm[0].length-2,gydwdm[0].length)=="00") {
                    gydwdm[0] = gydwdm[0].substr(0,gydwdm[0].length-2);
                }
                if (gydwdm[0].substr(gydwdm[0].length-2,gydwdm[0].length)=="00") {
                    gydwdm[0] = gydwdm[0].substr(0,gydwdm[0].length-2);
                }
                gydwstr = gydwdm[0] ;
            } else {
                gydwstr = gydwdm.join(',');
            }

            // 数据填报及时性
            $("#grid").datagrid({
                url:'/jxcsxm/operate/queryDatatjsxList.do',
                striped:true,
                pagination:true,
                rownumbers:true,
                pageNumber:1,
                pageSize:15,
                pageList: [15, 30, 45, 60, 75],
                checkOnSelect:true,
                loadMsg: "数据正在加载中...",
                height:$(window).height()-120,
                width:$('#searchField').width()+2,
                queryParams: {
                    gydwdm: gydwstr,
                    startTime: $("#startTime").datebox("getValue"),
                    endTime: $("#endTime").datebox("getValue"),
                    jsxz: getValuesById("xmlx")
                },
                columns: [[
                    {
                        field:'xu',title:'序号',width:100,align:'center'
                    },{
                        field:'gydw',title:'管养单位名称',width:180,align:'center'
                    },{
                        field:'xmmc',title:'项目名称',width:200,align:'center'
                    },{
                        field:'jsxz',title:'项目类型',width:160,align:'center'
                    },{
                        field:'jhxdwh',title:'计划下达文号',width:160, align:'center'
                    },{
                        field:'wruzj', title: '未录入到位资金', width:160, align:'center',
                        formatter: function (value, row, index) {
                            return '<img src="./js/wujiaox.png" alt="未录入到位资金" title="未录入到位资金">';
                        }
                    },{
                        field: 'tbtime', title: '计划下达时间', width: 160, align: 'center'
                    }
                ]]
            });
        }
    </script>
    <style type="text/css">
        TD {
            font-size: 12px;
        }
        a{
            text-decoration:none;
        }
        .abgc_td td{padding-right:5px;}
    </style>
</head>
<body>
    <div id="righttop">
        <div id="p_top">统计报表>&nbsp&nbsp;数据填报滞后情况</div>
    </div>
    <table width="99.9%" border="0" style="margin-top: 1px; margin-left: 1px;" cellspacing="0" cellpadding="0">
        <tr>
            <td align="left" style="padding-left:10px;padding-right: 10px; padding-top: 5px;">
                <fieldset id="searchField" style="width:99.9%; text-align: left; vertical-align: middle;">
                    <legend style="padding: 0 0 0 0; font-weight: bold; color: Gray; font-size: 12px;">
                        <font style="color: #0866A0; font-weight: bold"></font>
                    </legend>
                    <div>
                        <table style="margin:4px; vertical-align:middle;" cellspacing="0" class="abgc_td" >
                            <tr height="28">
                                <td align="right">管养单位：</td>
                                <td><select id="gydw" style="width:160px;"></select></td>
                                <td align="right">时间范围：</td>
                                <td>
                                    <input id="startTime" type="text">
                                </td>
                                <td> - </td>
                                <td>
                                    <input id="endTime" type="text">
                                </td>
                                <td align="right">项目类型：</td>
                                <td>
                                    <input id="xmlx" type="text" style="width: 100px">
                                </td>
                                <td>
                                    <a id='mybuttion1' style="margin-top: 1px;margin-bottom: 1px;" href="javascript:queryXmlist()" onmouseover="szgq('button button-tiny button-glow button-rounded button-raised button-primary','mybuttion1')" onmouseout="szgq('button button-tiny button-rounded button-raised button-primary','mybuttion1')"  class="button button-tiny button-rounded button-raised button-primary">查询</a>
                                    <a id='mybuttion2' style="margin-top: 1px;margin-bottom: 1px;" href="javascript:exportXm()" onmouseover="szgq('button button-tiny button-glow button-rounded button-raised button-primary','mybuttion1')" onmouseout="szgq('button button-tiny button-rounded button-raised button-primary','mybuttion1')"  class="button button-tiny button-rounded button-raised button-primary">导&nbsp;&nbsp;出</a>
                                </td>
                            </tr>
                        </table>
                    </div>
                </fieldset>
            </td>
        </tr>
        <tr>
            <td style="padding-left: 10px; font-size:12px;">
                <div><table id="grid"></table></div>
            </td>
        </tr>
    </table>
</body>
</html>
